package cn.bone.gateway.dao;

import cn.bone.gateway.bean.ErrorRecord;
import org.mongodb.morphia.Datastore;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * Created by superbone on 2017/4/24.
 */
@Repository
public class ErrorRecordDao {

    @Resource
    private Datastore datastore;

    @Async("loggerAsync")
    public void save(ErrorRecord record){
        datastore.save(record);
    }
}
